<!DOCTYPE html>
<html>
<head>
<title>input.html</title>

<meta name="keywords" content="keyword1,keyword2,keyword3">
<meta name="description" content="this is my page">
<meta name="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="../Styles/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../Styles/admin-all.css" />

<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script language="javascript">
	function chkads() {

		if (if_selectid.txtid.value == "") {
			alert("编号不能为空.");
			if_selectid.txtid.select();
			return false;
		}
		if (if_selectid.txtname.value == "") {
			alert("名称不能为空.");
			if_selectid.txtname.select();
			return false;
		}
		if (!IsNum(if_selectid.txtid.value)) {
			alert("编号请输入数字!")
			if_selectid.txtid.focus();
			return false;
		}
	}
	function IsNum(num) {
		var reNum = /^\d*$/;
		return (reNum.test(num));
	}
</script>
</head>

<body>
	<form onSubmit="return chkads()" name="if_selectid"
		action="../DepartmentInputServlet" method="post">
		<table class="table table-striped table-bordered table-condensed list">
			<tbody>
				<tr>
					<td>编号：</td>
					<td>名称：</td>
				</tr>
				<tr class="demo">
					<td><input type="text" name="txtid" /></td>
					<td><input type="text" name="txtname" /></td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="6"><input name="input" value="增加"
						class="btn btn-inverse" id="find" type="submit" /></td>
				</tr>
			</tfoot>
		</table>
	</form>
</body>
</html>
